package com.luyu.service;

import org.springframework.security.core.authority.SimpleGrantedAuthority;

import java.util.List;

/**
* @author HASEE
* @description 针对表【permission】的数据库操作Service
* @createDate 2024-03-11 21:37:12
*/
public interface PermissionService {

    /**
     * 通过角色id列表获取权限列表
     * @param roleIdList
     * @return {@link List}<{@link SimpleGrantedAuthority}>
     */
    List<SimpleGrantedAuthority> listByRoleIds(List<Long> roleIdList);

    /**
     * 通过权限码获取所有角色id
     * @param permissionCode
     * @return
     */
    List<Long> listRoleIdsByPermissionCode(String permissionCode);
}
